<?php

     session_start();
     include('common.php');

    if (session_is_registered(MySBB_Admin_username) and $member_permission == 1)
    {





/*                     \===============^==============/
                         =      This Hack Is For MySmartBB 1.6.0 Beta 1 =
                         =                                                        AND =
                         =                                        MySmartBB 1.50 =
                         =                                      Write By : FF5006 =     
                         =                               faha1ad2@hotmail.com =
                         =                                          www.r9ef.com =
                         =                                 www.mysmartbb.com =
                        /===============================\
***/


$d = "c";
         if ($_GET['where'] == index)
         {
         
           print " <BR>";
                 $or = $DB->sql_query(" SELECT * FROM ". $db_prefix . "banned WHERE id=1");
                 $row = $DB->sql_fetch_array($or);
                 $Smarty->assign("row",$row);
                 $ip = $row['banned_ip'];
                 $why = $row['banned_why'];
                 $Smarty->display('banned_ip.tpl');
             }

             if ($_GET['where'] == edit)
             {
             if ($_POST['smart_ip'] == "" ) {
                 $SF->error('يرجى تعبئة كافة المعلومات');
}

                else
{
                    
          
                  if ($_POST['banned_why'] == "" ) {
                            $SF->error('يرجى تعبئة كافة المعلومات');
                         }
                       else
                        {
                       $sip = $_POST['smart_ip'];
                       $bnw = $_POST['banned_why'];
               $insert = $DB->sql_query("UPDATE ". $db_prefix ."banned SET `banned_ip`='$sip', `banned_why`='$bnw' WHERE id=1")
;
                

                 if ($insert)
                     {
                         $SF->msg('تم بنجاح !');
                     }
                 else {
                $SF->msg('خطأ !');

         }
}
}
}
}
?>